
/*
* Copyright 2017-2018 pinganfang
* All right reserved.
*
*/
package com.pingan.haofang.searchcloud.indexdatasource.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import com.pingan.haofang.searchcloud.common.domain.BaseDomain;
import com.pingan.haofang.searchcloud.common.domain.IdGetter;

/**
 * MQ数据源
 *
 * @author huhailiang937
 */
@Entity
@Table(name = "t_index_datasource_mq")
@EntityListeners({AuditingEntityListener.class})
public class IndexDatasourceMQ extends BaseDomain implements IdGetter<Long> {

    /**
     * ID
     */
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name = "id")
    private Long id;

    /**
     * 导入queue名称
     */
    @Column(name = "mq_queue")
    private String mqQueue;

    /**
     * 缓冲区大小
     */
    @Column(name = "buffer_size")
    private Integer bufferSize;

    /**
     * 最大等待时间，毫秒
     */
    @Column(name = "max_wait_time")
    private Integer maxWaitTime;

    /**
     * 状态 0：正常 1：停用
     */
    @Column(name = "status")
    protected Integer status;

    /**
     * ID
     *
     * @param id the value for id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * ID
     *
     * @return id the value for id
     */
    public Long getId() {
        return this.id;
    }

    /**
     * 导入queue名称
     *
     * @param mqQueue the value for mq_queue
     */
    public void setMqQueue(String mqQueue) {
        this.mqQueue = mqQueue;
    }

    /**
     * 导入queue名称
     *
     * @return mqQueue the value for mq_queue
     */
    public String getMqQueue() {
        return this.mqQueue;
    }

    /**
     * 缓冲区大小
     *
     * @param bufferSize the value for buffer_size
     */
    public void setBufferSize(Integer bufferSize) {
        this.bufferSize = bufferSize;
    }

    /**
     * 缓冲区大小
     *
     * @return bufferSize the value for buffer_size
     */
    public Integer getBufferSize() {
        return this.bufferSize;
    }

    /**
     * 最大等待时间，毫秒
     *
     * @param maxWaitTime the value for max_wait_time
     */
    public void setMaxWaitTime(Integer maxWaitTime) {
        this.maxWaitTime = maxWaitTime;
    }

    /**
     * 最大等待时间，毫秒
     *
     * @return maxWaitTime the value for max_wait_time
     */
    public Integer getMaxWaitTime() {
        return this.maxWaitTime;
    }

    /**
     * @return the status
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * @param status the status to set
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    @Override
    public String toString() {
        return "IndexDatasourceMQ{" +
                "id=" + id +
                ", mqQueue='" + mqQueue + '\'' +
                ", bufferSize=" + bufferSize +
                ", maxWaitTime=" + maxWaitTime +
                ", status=" + status +
                "} " + super.toString();
    }
}
